package com.winter.portal.api.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 系统日志记录表
 * </p>
 *
 * @author jzyan
 * @since 2022-03-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RoleDTO implements Serializable {

    @NotNull(message = "not null", groups = Update.class)
    @ApiModelProperty("id")
    private Long id;
    @NotBlank(message = "not null")
    @Length(min = 1, max = 20, message = "角色名称1-20字符")
    @ApiModelProperty(value = "角色名称", required = true)
    private String roleName;
    @ApiModelProperty("简述")
    @Length(max = 30, message = "简述30字符以内")
    private String description;
    @NotNull(message = "not null")
    @Max(value = 1, message = "0或1")
    @Min(value = 0, message = "0或1")
    @ApiModelProperty(value = "是否启用 1-是，0-否", required = true)
    private Integer enabled;

    public interface Update {
    }

}
